package com.sto.stoapp.thread;


import com.sto.stoapp.http.ServerSmsHttpManager;
import com.sto.stoapp.http.MessageType;
import com.sto.stoapp.http.request.ServerSmsRequest;

import android.content.Context;
import android.os.Handler;
import android.os.Message;

public class ServerSmsThread extends BaseThread{
	
	private Context context;
	private ServerSmsRequest entity;
	private Handler handler;
	
	public ServerSmsThread(Context context,ServerSmsRequest entity,
			Handler handler) {
		super(context);
		this.context = context;
		this.entity = entity;
		this.handler = handler;
	}
	
	@Override
	public void run() {
		super.run();
		ServerSmsHttpManager httpManager = new ServerSmsHttpManager(context);
		Message msg = handler.obtainMessage();
		msg.obj = httpManager.dopost("http://222.66.39.194:8809/SiteInfo.ashx",entity);
		msg.what = MessageType.SERVER_SMS_TYPE;
		handler.sendMessage(msg);
	}

}
